/*
 * Copyright (C) 2013 Daniel Treffenstädt <daniel@treffenstaedt.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301  USA
 */

#ifndef O_MOUSEEVENT_H
#define O_MOUSEEVENT_H

#include "../OGlobal.h"

#include "OEvent.h"
#include "OKeyEvent.h"
#include "OPosition.h"


O_START_NAMESPACE

class O_EXPORT MouseEvent : public Event
{
public:
	enum class Button
	{
		None			= 0x00, //!< None
		Left			= 0x01, //!< Left Button
		Right			= 0x02, //!< Right Button
		Middle			= 0x03, //!< Middle Button
		Button3			= 0x04, //!< Button 3
		Button4			= 0x05, //!< Button 4
		Button5			= 0x06, //!< Button 5
		Button6			= 0x07, //!< Button 6
		Button7			= 0x08  //!< Button 7
	};

	enum class Action
	{
		Press,		//!< Mouse Key Pressed
		Move,		//!< Mouse moved
		Release		//!< Mouse Key Released
	};

private:
	Button				m_button;
	KeyEvent::Modifier	m_modifier;
	Action				m_action;
	Position			m_pos;

	int					m_scrolling;

public:
	MouseEvent(Button button, KeyEvent::Modifier modifier, Action action, Position pos, int scroll);
	Button button();
	KeyEvent::Modifier modifier();
	Action action();
	Position pos();

	int scroll();
};

O_END_NAMESPACE

#endif // O_MOUSEEVENT_H
